﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Storyboard x:Key="FadeInStyoryboard">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <Storyboard x:Key="FadeOutStyoryboard">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Style x:Key="FadeInOnHover" TargetType="{x:Type FrameworkElement}">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Mouse.MouseEnter">
                <BeginStoryboard x:Name="FadeIn_BeginStoryboard" Storyboard="{StaticResource FadeInStyoryboard}"/>
            </EventTrigger>
            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                <BeginStoryboard x:Name="FadeOut_BeginStoryboard" Storyboard="{StaticResource FadeOutStyoryboard}"/>
            </EventTrigger>
        </Style.Triggers>
        
    </Style>
</ResourceDictionary>